<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改生产工单')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-workorder-edit" th:object="${workOrder}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">工单号：</label>
                <div class="col-sm-8">
                    <input name="workOrder" th:field="*{workOrder}" class="form-control" type="text">
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">创建人：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="createPerson" th:field="*{createPerson}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">计划产能：</label>
                <div class="col-sm-8">
                    <input name="planQty" th:field="*{planQty}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">实际产能：</label>
                <div class="col-sm-8">
                    <input name="realQty" th:field="*{realQty}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" hidden="hidden">
                <label class="col-sm-3 control-label">负责人id：</label>
                <div class="col-sm-8">
                    <input name="principalId" th:field="*{principalId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">负责人账号：</label>
                <div class="col-sm-8">
                    <select id="principalName" name="principalName" class="form-control">
                        <option th:each="user : ${user}" th:text="${user['loginName']}" th:value="${user['userId']}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "WorkOrder/workorder";
        $("#form-workorder-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-workorder-edit').serialize());
            }
        }
    </script>
</body>
</html>